package com.api.test;

/**
 *  定义一个测试Service
 *
 *  spring.factories文件位于resources/META-INF目录下，需要手动创建;
 * org.springframework.boot.autoconfigure.EnableAutoConfiguration后面的类名说明了自动装配类，如果有多个 ，则用逗号分开;
 * 使用者应用（SpringBoot）在启动的时候，会通过org.springframework.core.io.support.SpringFactoriesLoader读取classpath下每个Starter的spring.factories文件，加载自动装配类进行Bean的自动装配；
 *
 */
public class DemoService {
    public String sayWhat;
    public String toWho;

    public DemoService(String sayWhat, String toWho) {
        this.sayWhat = sayWhat;
        this.toWho = toWho;
    }

    public String say() {
        return this.sayWhat + "!  " + toWho;
    }
}
